<script setup lang="ts">
import { ref, provide } from 'vue'
import printHtml from '@/utils/print'
import WangEditor from '@/components/WangEditor.vue'

let valueHtml = ref('<p>abc</p>')
provide('valueHtml', valueHtml)

let printEle = ref()
</script>

<template>
  <div>
    <el-button @click="printHtml(printEle)">打印</el-button>
    <WangEditor />
    <div ref="printEle" v-html="valueHtml" />
  </div>
</template>

<style scoped></style>
